void fix_datum(double *lat, double *lon)
{
double amt;
- static int wgs84;
-
- if (wgs84 == 0) {
- wgs84 = GPS_Lookup_Datum_Index("WGS 84");
- }
/*
* Avoid FP jitter in the common case.
*/
- if (input_datum != wgs84) {
+ if (input_datum != DATUM_WGS84) {
GPS_Math_Known_Datum_To_WGS84_M(*lat, *lon, 0.0, lat, lon,
&amt, input_datum);
}
compegps_rd_init(const char *fname)
{
fin = gbfopen(fname, "rb", MYNAME);
- input_datum = GPS_Lookup_Datum_Index("WGS 84");
+ input_datum = DATUM_WGS84;
}
static void
static waypoint *xmlwpt;
static route_head *xmltrk;
static char *xmlgrid;
-static int xmldatum, datum_WGS84, datum_OSGB36;
+static int xmldatum;
static double xmlEasting, xmlNorthing;
static double xmlLatitude, xmlLongitude;
static double xmlAltitude;
static void
convert_datum(waypoint *wpt, int datum)
{
- if (datum != datum_WGS84) {
+ if (datum != DATUM_WGS84) {
double lat = wpt->latitude;
double lon = wpt->longitude;
double alt = wpt->altitude;
if (strcmp(xmlgrid, "BNG") == 0) {
GPS_Math_NGENToAiry1830LatLon(xmlEasting, xmlNorthing,
&wpt->latitude, &wpt->longitude);
- xmldatum = datum_OSGB36;
+ xmldatum = DATUM_OSGB36;
}
else {
wpt->latitude = xmlLatitude;
tlog3b_xgcb_wptst(const char *args, const char **unused)
{
xmlwpt = waypt_new();
- xmldatum = datum_WGS84;
+ xmldatum = DATUM_WGS84;
}
tlog3b_xgcb_tptst(const char *args, const char **unused)
{
xmlwpt = waypt_new();
- xmldatum = datum_WGS84;
+ xmldatum = DATUM_WGS84;
}
{
fin = gbfopen_le(fname, "rb", MYNAME);
- datum_OSGB36 = GPS_Lookup_Datum_Index("OSGB36");
- datum_WGS84 = GPS_Lookup_Datum_Index("WGS84");
-
xmlbin = NULL;
xmltrk = NULL;
xmlwpt = NULL;